{{extends file="admin/admin_header.tpl"}}
{{block name="content"}}
<h3>
	添加新用户
	<div class="pull-right">
		<a href="{{site_url('user/index')}}" class="btn btn-sm btn-default">返回用户列表</a>
	</div>
</h3>
<ul class="nav nav-tabs">
	<li class="active">
		<a href="#tab-general" style="background-color: #f8f8f8 !important;">用户信息</a>
	</li>
</ul>
<form action="{{site_url("user/store")}}" method="post" class="form-horizontal" autocomplete="off" style="background:#f8f8f8;padding:1em;border:1px solid #ddd;border-top:0;">
	<input type="hidden" name="Method" value="{{$Method}}">
	<input type="hidden" name="Id" value="{{$user.0.Id}}">
	<div class="tab-content">
		<div class="tab-pane active" id="tab-general" style="margin: 0 20px;">
			<div class="form-group">
				<label for="name">用户身份</label>
				<select name="Type" class="form-control">
					<option value="超级管理员" {{IsSelected("超级管理员",$user.0.Type)}} >超级管理员</option>
					<option value="普通管理员" {{IsSelected("普通管理员",$user.0.Type)}}>普通管理员</option>
				</select>
			</div>
			{{if $user_now=="超级管理员"}}
			<div class="form-group">
				<label for="name" style="display:block;">负责栏目</label>
				<span>导航模块：</span>
				<input type="checkbox" name="permission[]"  value="11" {{isChecked(11,$user.0.permission)}}/>热点新闻
				<input type="checkbox" name="permission[]"  value="2" {{isChecked(2,$user.0.permission)}}/>学院概况
				<input type="checkbox" name="permission[]"  value="3" {{isChecked(3,$user.0.permission)}}/>师资队伍
				<input type="checkbox" name="permission[]"  value="4" {{isChecked(4,$user.0.permission)}}/>科学研究
				<input type="checkbox" name="permission[]"  value="5" {{isChecked(5,$user.0.permission)}}/>人才培养
				<input type="checkbox" name="permission[]"  value="6" {{isChecked(6,$user.0.permission)}}/>国际交流
				<input type="checkbox" name="permission[]"  value="7" {{isChecked(7,$user.0.permission)}}/>学生工作
				<input type="checkbox" name="permission[]"  value="8" {{isChecked(8,$user.0.permission)}}/>招生就业
				<input type="checkbox" name="permission[]"  value="99" {{isChecked(99,$user.0.permission)}}/>党群工作
				<input type="checkbox" name="permission[]"  value="9" {{isChecked(9,$user.0.permission)}}/>院企合作
				</br>
				<span>新闻模块：</span>
				<input type="checkbox" name="permission[]"  value="12" {{isChecked(12,$user.0.permission)}}/>学院办公室
				<input type="checkbox" name="permission[]"  value="16" {{isChecked(16,$user.0.permission)}}/>科学研究
				<input type="checkbox" name="permission[]"  value="109" {{isChecked(109,$user.0.permission)}}/>人事人才
				<input type="checkbox" name="permission[]"  value="13" {{isChecked(13,$user.0.permission)}}/>国际合作
				<input type="checkbox" name="permission[]"  value="14" {{isChecked(14,$user.0.permission)}}/>本科生教育
				<input type="checkbox" name="permission[]"  value="15" {{isChecked(15,$user.0.permission)}}/>研究生教育
				<input type="checkbox" name="permission[]"  value="17" {{isChecked(17,$user.0.permission)}}/>学生事务
				<input type="checkbox" name="permission[]"  value="18" {{isChecked(18,$user.0.permission)}}/>继续教育
			</div>
			{{/if}}
			<div class="form-group">
				<label for="name">用户名称</label>
				<input type="text" name="UserName" class="form-control" value="{{$user.0.UserName}}">
			</div>
			<div class="form-group">
				<label for="name">用户密码</label>
				<input type="password" name="Password" class="form-control" />
			</div>
		</div>
	</div>
	<div class="control-group">
		<div class="controls">
			<button type="reset" class="btn btn-default">清空</button>
			<button type="submit" class="btn btn-success">提交</button>
		</div>
	</div>
</form>
{{/block}}
